package app.services.impl;

import java.util.List;

import app.models.Credito;
import app.repositories.CreditoRepository;
import app.repositories.Repository;
import app.services.CreditoService;
import br.com.caelum.vraptor.ioc.Component;

@Component
public class CreditoServiceImpl extends GenericServiceImpl<Credito, Long> implements CreditoService {

	private final CreditoRepository repository;
	
	public CreditoServiceImpl (CreditoRepository repository){
		this.repository = repository;
		super.setGenericRepository((Repository<Credito, Long>) repository);
	}
	
	@Override
	public List<Credito> findByFilter(String filter) {
		return repository.findByFilter(filter);
	}

	@Override
	public List<Credito> findAllOrdered() {
		return repository.findAllOrdered();
	}

	@Override
	public List<Credito> findLastCreditos() {
		return repository.findLastCreditos();
	}

	
}
